﻿<%@ Page Language="C#" AutoEventWireup="true"  MasterPageFile="~/Layouts/Form.Master" CodeBehind="DistributePlanDetailEdit.aspx.cs" Inherits="HHMMS.UI.Modules.PlanManager.DistributePlanDetailEdit" %>

<asp:Content ContentPlaceHolderID="head" ID="idFormTitle" runat="server">
    <title><%=Request["title"]%></title>
  <%--   <script src="Script/Storage.js"></script>--%>
</asp:Content>
<asp:Content ContentPlaceHolderID="Content" ID="idFormMain" runat="server">
    <web:SmartFormView ID="SmartFormView1" runat="server" DataKeyNames="Id" DataSourceID="SmartDataSource1"
        Width="100%">        
        <InsertItemTemplate></InsertItemTemplate>
        <EditItemTemplate></EditItemTemplate>
        <ItemTemplate>
            <asp:TextBox ID='Id' runat='server' Text='<%# Bind("Id") %>' Width='90%'
                            Visible="false"></asp:TextBox> 
          <div>
            <table cellpadding='2' cellspacing='1' width='100%' class="formitem">
             <caption><%=Request["title"]%></caption>
                <tr>
                    <th>                        
                        物资编号:
                    </th>
                    <td>
                         <asp:TextBox ID='txtMaterialsNo' Name='MaterialsNo' runat='server' Text='<%# Bind("MaterialsNo") %>' Width='90%' MaxLength="30"
                            validator="length[1,50]"></asp:TextBox>   
                             <asp:TextBox ID='MgID' Name="MgID" runat='server'  Width='90%'
                            Visible="false"></asp:TextBox>                     
                    </td>
                    <th>
                        物资名称:<font color='red'>*<font>
                    </th>
                    <td>
                        <asp:TextBox ID='txtMaterialsName' Name='MaterialsName' runat='server' Text='<%# Bind("MaterialsName") %>' Width='90%' MaxLength="20"
                            validator="required,length[1,100]"></asp:TextBox>
                    </td>
                    <th>                        
                        物资规格（型号）:
                    </th>
                    <td>
                        <asp:TextBox ID='txtMaterialsModel' Name='MaterialsModel' runat='server' Text='<%# Bind("MaterialsModel") %>' Width='90%' MaxLength="20"
                            validator="length[1,100]"></asp:TextBox>
                    </td>
                </tr>    
                 <tr> 
                     <th>                        
                        数量:
                    </th>
                    <td>
                         <asp:TextBox ID='txtDeliveredNum' runat='server' Name='DeliveredNum' Text='<%# Bind("DeliveredNum") %>'  validator="required,double,length[1,50]" Width='90%' MaxLength="30"></asp:TextBox>                        
                    </td>
                    <th>                        
                        计量单位:
                    </th>
                    <td>
                         <asp:TextBox ID='txtUnit' runat='server' Name='unit' Text='<%# Bind("unit") %>' Width='90%' MaxLength="30"
                            validator="length[1,50]"></asp:TextBox>                        
                    </td>
                    <th>
                        机型:
                    </th>
                    <td>
                        <asp:TextBox ID='txtMtype' runat='server' Name='Mtype' Text='<%# Bind("Mtype") %>' Width='90%' MaxLength="20"
                            validator="length[1,100]"></asp:TextBox>
                    </td>
                </tr>          
                  <tr>
                    <th>                        
                        入库时间:
                    </th>
                    <td>
                            <web:DatePicker ID="dpStorageTime" Name="Time" Text='<%# Bind("Time") %>' Width='90%' MaxLength="30" runat="server" DateTimeFormat="yyyy-MM-dd"
                                validator="required"></web:DatePicker>       
                    </td>
                    <th>
                        备注:
                    </th>
                    <td>
                       <asp:TextBox ID='TextBox1' runat='server' Name='Remark' Text='<%# Bind("Remark") %>' Width='90%' MaxLength="20"
                            validator="length[1,200]"></asp:TextBox>
                    </td>
                     <th></th>
                    <td></td>
                    </tr>        
            </table>
        </div>
        </ItemTemplate>
    </web:SmartFormView>
    
    <web:SmartSqlDataSource ID="SmartDataSource1" runat="server" SelectCommand="DistributePlanDetail.select"
     SelectCommandAutoPageWrap="false" InsertCommand="DistributePlanDetail.insert" UpdateCommand="DistributePlanDetail.update">
    </web:SmartSqlDataSource>

    <!-- 页脚区域 -->
	<div class="footer">
		<asp:Button ID="Button1" runat="server" Text="确定" 
            OnClientClick="return validateForm();" onclick="Save"/>        
        <asp:Button ID="CloseButton2" runat="server" Text="关闭" OnClientClick="return closeForm();" />        
	</div>
     <script type="text/javascript">

         $(function () {
             $("input[id$='MgID']").val('<%= this.mgID %>');
         });
    </script>
</asp:Content>